package com.kangye.enterprise.frontdesk.controller;

import com.kangye.enterprise.frontdesk.entity.Circular;
import com.kangye.enterprise.frontdesk.service.CircularService;
import com.kangye.enterprise.frontdesk.util.ViewJsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: enterprise
 * @description:通知表调用接口
 * @author: 索腾龙
 * @create: 2021-05-27 15:31
 **/
@RestController
@CrossOrigin
@RequestMapping("/circular")
public class CircularController {
    @Autowired
    private CircularService circularService;
    //查询某地区的全部通知和政策(索腾龙)
    @RequestMapping("/selCircular")
    public ViewJsonObject<Circular> selCircular(Integer circularSynthesis, String regionName){
        //返回Service数据
        return circularService.selCircular(circularSynthesis, regionName);
    }
    //查询通知和政策的某条详细信息(索腾龙)
    @RequestMapping("/selCircularById")
    public ViewJsonObject<Circular> selCircularById(Integer circularSynthesis, Integer circularId){
        //掉Service方法
        return circularService.selCircularById(circularSynthesis, circularId);
    }
}